<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li><a ui-sref="main.biz.adSlot.list">广告位列表</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 内容区域 -->
<div class="wrapper-md content">
    <div class="panel panel-default">
        <!-- 头部 -->
        <div class="panel-heading font-bold">{{title}}
        	<a class="btn btn-sm btn-icon btn-rounded btn-default pull-right m-t-n-xs" ui-sref="main.biz.adSlot.list"><i class="text-md fa fa-times text-muted"></i></a>
        </div>
        
		<!--表单-->
		<div class="panel-body">
			<form class="form-horizontal" name="user_form">
				<div class="form-group">
                  	<div class="row">
                  		<label class="col-sm-2 control-label pull-right"></label>
                  		<label class="col-sm-1 control-label pull-right"><button class="btn btn-danger" ng-if="record.state==2"  ng-click="preview()">审核失败</button></label>
						<label class="col-sm-1 control-label pull-right"><button class="btn btn-success" ng-if="record.state==2" ng-click="approve(record.id,3)">审核通过</button></label>
					</div>

                </div>
			

                <div class="form-group">
                	<div class="row">
                    	<label class=" col-sm-3 control-label">广告位名称:</label>
                    	<label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.adSlotName}}</label>
                        <!--流量主-->
                        <label class="col-lg-2 col-sm-3 control-label">流量主:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.supplyName}}</label>

                        <label ng-show="record.state==2||record.state==3">是否支持"0"元投广告
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <select ng-model="record.deliveryType" name="deliveryType" id="deliveryType" ng-options="deliveryType.typeId as deliveryType.typeName for deliveryType in typeList" style="width:50px;"></select>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <button class="btn btn-danger" ng-click="updateZero(record.id,record.deliveryType)" >修改</button>
                        </label>
                    
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <!--渠道名称-->
                        <label class="col-sm-3  control-label">平台名称:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.platformName}}</label>
                        <!--单片允许数量-->
                        <label class="col-lg-2 col-sm-3 control-label">单片允许数量:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.capacity}}</label>


                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                    <!--广告位置-->
                   <!-- <label class="col-lg-2 col-sm-3 control-label">广告位置:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.adPosition}}</label>-->
                    <!--渠道类型-->
                    <label class="col-sm-3  control-label">平台类型:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                        <span ng-if="record.platformType=='1'">网站</span>
                        <span ng-if="record.platformType=='2'">APP</span>
                    </label>

                    <!--流量主价格-->
                    <label class="col-lg-2  control-label">服务价格:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.price}}</label>

                    <label ng-show="record.state==2||record.state==3" class="col-sm-1 col-lg-1"  style="padding-top:3px;"><input id="adsoltPrice" type="text"></label>
                    <label ng-show="record.state==2||record.state==3" class="col-sm-1 control-label pull-left">
                        <button class="btn btn-danger" ng-click="updatePrice(record.id)" >修改价格</button>
                    </label>
                </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <!--广告模式-->
                        <label class="col-sm-3  control-label">页面级数:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.pageLevel=='1'">首页</span>
                            <span ng-if="record.pageLevel=='2'">二级页面</span>
                            <span ng-if="record.pageLevel=='3'">三级或三级以上</span>
                        </label>
                        <!--平台点击价格-->
                        <label class="col-lg-2 col-sm-3 control-label">平台点击价格:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.clickPrice}}</label>
                </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                    <!--广告形式-->
                    <label class=" col-sm-3 control-label">广告形式:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                    	<span ng-if="record.adForm=='1'">纯图片</span>
                        <span ng-if="record.adForm=='2'">图文</span>
                        <span ng-if="record.adForm=='3'">纯文字</span>
                    </label>
                        <!--图片支持类型-->
                      <label class="col-lg-2 col-sm-3 control-label">广告位价格:</label>
                      <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.adslotPrice}}</label>

                </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="form-group">
                    <div class="row">
                        <!--图片尺寸-->
                        <label class="col-sm-3 control-label">图片尺寸:</label>
                        <label class="col-sm-3 col-lg-2">
                            <span ng-if="record.scale=='1'">4:1</span>
                            <span ng-if="record.scale=='2'">8:1</span>
                            <span ng-if="record.scale=='3'">16:1</span>
                            <span ng-if="record.scale=='4'">1:1</span>
                            <span ng-if="record.scale=='5'">1:2</span>
                            <span ng-if="record.scale=='6'">4:3</span>
                            <span ng-if="record.scale=='7'">1:5</span>
                            <span ng-if="record.scale=='8'">1:3</span>
                        </label>
                    <label class="col-lg-2 col-lg-2 control-label">文字字数限制:</label>
                    <label class="col-sm-3 col-lg-2 " style="padding-top:3px;">{{record.minWordNumber}}-{{record.maxWordNumber}}</label>
                   </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <!--广告类型-->
                        <label class=" col-sm-3 control-label">广告类型:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.adType=='1'">单片</span>
                            <span ng-if="record.adType=='2'">轮播</span>
                        </label>
                        <!--状态-->
                            <label class="col-lg-2 col-sm-3 control-label">状态:</label>
                            <label class="col-sm-3">
                                <span ng-if="record.state==1">未提交</span>
                                <span ng-if="record.state==2" class="text-danger">待审核</span>
                                <span ng-if="record.state==3" class="text-success">启用中</span>
                                <span ng-if="record.state==4">审核失败</span>
                                <span ng-if="record.state==5">停用中</span>
                                <span ng-if="record.state==6">取消/删除</span>
                            </label>
                        </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                <div class="form-group">
                    <label class="col-sm-3 control-label">行业标签:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.industryKeyword}}</label>
                    <label class="col-lg-2 col-sm-3 control-label">图片支持类型:</label>
                    <label class="col-sm-3 col-lg-2" style="padding-top:3px;">JPG/PNG</label>
                </div>

                </div>
                <div class="cover" ng-show="firstApply">
                    <div class="firstApplyWrap">
                        <div class="clear"><i class="iconfont closeBtn noselect" ng-click="firstApply=false">&#xe608;</i></div>
                        <div class="title" ><textarea  placeholder="请输入审核失败的原因......" class="form-control" rows="5" id="remark"></textarea>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" ng-click="firstApply=false" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-primary" ng-click="approve(record.id,4)">确定</button>
                            </div>
                        </div>
                    </div>
                </div>

			</form>
		</div>
    </div>
</div>
<style>
    .cover {
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        top: 0;
        left: 0;
        /* display: none; */
    }

    .firstApplyWrap{
        width: 550px;
        height:280px;
        background: #fff;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        border-radius: 5px;
        overflow: hidden;
    }
    .firstApplyWrap .title{
        font-size: 18px;
        color:#333;
        padding:18px 36px 0 36px;
        text-align: center;
        line-height: 2em;
    }
    .firstApplyWrap .closeBtn,.finishData .closeBtn{
        font-size: 30px;
        padding:5px 10px 0 0;
        border-radius: 50%;
        color: #ccc;
        float: right;
        cursor: pointer;
    }
    .finishData .closeBtn{
        position: absolute;
        top:10px;
        right:10px;
    }
    .firstApplyWrap .bkgIcon{
        position: absolute;
        left: 54px;
        top:87px;
        font-size: 50px;
        color:#FFB136;
    }
    .firstApplyWrap .applyBtnWrap{
        position: absolute;
        bottom: -2px;
        width: 100%;
    }
    .firstApplyWrap .applyBtn{
        width: 50%;
        height:70px;
        line-height: 70px;
        background: #FFB135;
        font-size: 20px;
        text-align: center;
        color:#fff;
        cursor: pointer;
        float:left;
    }
    .firstApplyWrap .applyBtn:last-child{
        background: #5796FC;
    }
</style>

